<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>Spring Security Example </title>
    <script th:src="@{plugins/jquery/jquery-3.3.1.min.js}" type="text/javascript"></script>
    <script th:src="@{plugins/jquery_form/jquery.form.js}" type="text/javascript"></script>
</head>
<body>
<div th:if="${param.error}">
    Invalid username and password.
</div>
<div th:if="${param.logout}">
    You have been logged out.
</div>
<form th:action="@{/login}" method="post">
    <div><label> User Name : <input type="text" name="username"/> </label></div>
    <div><label> Password: <input type="password" name="password"/> </label></div>
    <div><input type="submit" value="Sign In"/></div>
</form>
<button class="testA">登录</button>
<form target="_blank" id="testId" action="http://www.impmacalline.com/api/saas/goLogin" method="post">
    <input name="username" value="JSH452776448">
    <input name="password" value="CQIVusvimlGFu4NvG3GLLA==">
</form>
</body>
<script>

    $('.testA').bind('click', function () {
        $.ajax({
            type: "POST",
            url: "http://www.impmacalline.com/api/saas/authUser",
            headers: {
                "rs-api-id": "8HY9S5oj",
                "rs-nonce": "5aWiAuj3K06U1kwE50v427dmIjWZouAu",
                "rs-timestamp": 1552530598836,
                "rs-sign": "506e712d5a24976ca7d9b948838adba4"
            },
            data: {
                username: "JSH1027724",
                password: "VPyZxbBz1G6IsWLexwHZ1Q==",
            },
            success: function (data) {
                console.log(data);
                if (data.code == 200) {
                    window.open("http://www.impmacalline.com/outLogin/saas?uuid=" + data.data.uuid);
                }
            }
        })
    })
</script>
</html>
